home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / CMConversions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  4.7 KB  |  180 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMConversions.h
  3.  
  4.      Contains:    ColorSync base <-> derived color space conversion Component interface
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1993, 1995, 1997 by Apple Computer, Inc. All rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __CMCONVERSIONS__
  19. #define __CMCONVERSIONS__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __COMPONENTS__
  25. #include <Components.h>
  26. #endif
  27. #ifndef __CMAPPLICATION__
  28. #include <CMApplication.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     CMConversionInterfaceVersion = 1
  56. };
  57.  
  58. /* Component function selectors */
  59.  
  60. enum {
  61.     kCMXYZToLab                    = 0,
  62.     kCMLabToXYZ                    = 1,
  63.     kCMXYZToLuv                    = 2,
  64.     kCMLuvToXYZ                    = 3,
  65.     kCMXYZToYxy                    = 4,
  66.     kCMYxyToXYZ                    = 5,
  67.     kCMRGBToHLS                    = 6,
  68.     kCMHLSToRGB                    = 7,
  69.     kCMRGBToHSV                    = 8,
  70.     kCMHSVToRGB                    = 9,
  71.     kCMRGBToGRAY                = 10,
  72.     kCMXYZToFixedXYZ            = 11,
  73.     kCMFixedXYZToXYZ            = 12
  74. };
  75.  
  76. EXTERN_API( ComponentResult )
  77. CMXYZToLab                        (ComponentInstance         ci,
  78.                                  const CMColor *        src,
  79.                                  const CMXYZColor *        white,
  80.                                  CMColor *                dst,
  81.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0000, 0x7000, 0xA82A);
  82.  
  83. EXTERN_API( ComponentResult )
  84. CMLabToXYZ                        (ComponentInstance         ci,
  85.                                  const CMColor *        src,
  86.                                  const CMXYZColor *        white,
  87.                                  CMColor *                dst,
  88.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
  89.  
  90. EXTERN_API( ComponentResult )
  91. CMXYZToLuv                        (ComponentInstance         ci,
  92.                                  const CMColor *        src,
  93.                                  const CMXYZColor *        white,
  94.                                  CMColor *                dst,
  95.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
  96.  
  97. EXTERN_API( ComponentResult )
  98. CMLuvToXYZ                        (ComponentInstance         ci,
  99.                                  const CMColor *        src,
  100.                                  const CMXYZColor *        white,
  101.                                  CMColor *                dst,
  102.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0003, 0x7000, 0xA82A);
  103.  
  104. EXTERN_API( ComponentResult )
  105. CMXYZToYxy                        (ComponentInstance         ci,
  106.                                  const CMColor *        src,
  107.                                  CMColor *                dst,
  108.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0004, 0x7000, 0xA82A);
  109.  
  110. EXTERN_API( ComponentResult )
  111. CMYxyToXYZ                        (ComponentInstance         ci,
  112.                                  const CMColor *        src,
  113.                                  CMColor *                dst,
  114.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
  115.  
  116. EXTERN_API( ComponentResult )
  117. CMRGBToHLS                        (ComponentInstance         ci,
  118.                                  const CMColor *        src,
  119.                                  CMColor *                dst,
  120.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0006, 0x7000, 0xA82A);
  121.  
  122. EXTERN_API( ComponentResult )
  123. CMHLSToRGB                        (ComponentInstance         ci,
  124.                                  const CMColor *        src,
  125.                                  CMColor *                dst,
  126.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0007, 0x7000, 0xA82A);
  127.  
  128. EXTERN_API( ComponentResult )
  129. CMRGBToHSV                        (ComponentInstance         ci,
  130.                                  const CMColor *        src,
  131.                                  CMColor *                dst,
  132.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0008, 0x7000, 0xA82A);
  133.  
  134. EXTERN_API( ComponentResult )
  135. CMHSVToRGB                        (ComponentInstance         ci,
  136.                                  const CMColor *        src,
  137.                                  CMColor *                dst,
  138.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
  139.  
  140. EXTERN_API( ComponentResult )
  141. CMRGBToGray                        (ComponentInstance         ci,
  142.                                  const CMColor *        src,
  143.                                  CMColor *                dst,
  144.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x000A, 0x7000, 0xA82A);
  145.  
  146. EXTERN_API( ComponentResult )
  147. CMXYZToFixedXYZ                    (ComponentInstance         ci,
  148.                                  const CMXYZColor *        src,
  149.                                  CMFixedXYZColor *        dst,
  150.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x000B, 0x7000, 0xA82A);
  151.  
  152. EXTERN_API( ComponentResult )
  153. CMFixedXYZToXYZ                    (ComponentInstance         ci,
  154.                                  const CMFixedXYZColor * src,
  155.                                  CMXYZColor *            dst,
  156.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x000C, 0x7000, 0xA82A);
  157.  
  158.  
  159.  
  160. #if PRAGMA_STRUCT_ALIGN
  161.     #pragma options align=reset
  162. #elif PRAGMA_STRUCT_PACKPUSH
  163.     #pragma pack(pop)
  164. #elif PRAGMA_STRUCT_PACK
  165.     #pragma pack()
  166. #endif
  167.  
  168. #ifdef PRAGMA_IMPORT_OFF
  169. #pragma import off
  170. #elif PRAGMA_IMPORT
  171. #pragma import reset
  172. #endif
  173.  
  174. #ifdef __cplusplus
  175. }
  176. #endif
  177.  
  178. #endif /* __CMCONVERSIONS__ */
  179.  
  180.